import { defineStore } from 'pinia'

export const useSingleQtsCorrectStore = defineStore('singleQtsCorrect', {
  state: () => {
    return {
      isRemark: false,
      markingMode: 0,
      taskId: '',
      classId: '',
      classType: 0,
      annotation_text: '',
      annotation_url: [],
      currentQtsData: {
        await_grade: 0,
        grade_rate: 0,
        question_detail: {},
        question_id: 0,
        question_type: '',
        student_count: 0,
        sub_question_info: null,
        submit_count: 0,
        un_submit_count: 0,
        item_type: 1, //1大题 2小题
        order_text: '',
        father_id: null
      }
    }
  },
  persist: {
    enabled: true,
    strategies: [
      {
        storage: localStorage,
        key: 'single_store',
        paths: ['taskId', 'classId', 'classType']
      }
    ]
  }
})
